home *** CD-ROM | disk | FTP | other *** search
- Path: newsfeed.kdcol.net!usenet
- From: eriko@axtech.com (Erik Olson)
- Newsgroups: comp.lang.c++
- Subject: Re: CTime (VC++ 4.0)
- Date: Thu, 15 Feb 1996 13:39:53 GMT
- Organization: Axiom Technologies
- Message-ID: <312336a1.53641712@server1>
- References: <mictaliDMrpvr.6n0@netcom.com>
- Reply-To: eriko@axtech.com
- NNTP-Posting-Host: s25.cs00.io.kdcol.net
- X-Newsreader: Forte Agent .99d/32.182
-
- On Wed, 14 Feb 1996 13:38:14 GMT, mictali@netcom.com (Jere McDevitt)
- wrote:
-
- >I have some databases that have tables using a DateTime sql type. When I
- >bind these fields to controls they always bind to a CTime type only. The
- >problem I have is that when setting the date of a CTime, it uses mktime
- >which has a base year of 1970 so entering any birthdates prior to 1970 fail.
- >
- >Anyone have any suggestions for getting around this problem, short of
- >re-doing the libraries?
- >
- >Is there another way of choosing the base time at ClassWizard create time
- >other than going into the .H file and changing it manually?
- >
-
- If you're using RFX_Date to exchange the data, you might want to
- consider using a TIMESTAMP_STRUCT instead of a CTime. This method
- enables you to deal with much broader time ranges at the cost of
- losing your Class Wizard support. RFX_Date is overloaded to take a
- reference to either type, so your code changes will be minimal. See KB
- Article Q114961 or the VC docs on RFX_Date for more info.
-
- Erik
-
-